home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19941221-19950208 / 000088_news@columbia.edu_Wed Jan 4 14:28:49 1995.msg < prev    next >
Internet Message Format  |  2020-01-01  |  6KB

  1. Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA19211
  2.   (5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Wed, 4 Jan 1995 09:28:56 -0500
  3. Received: by apakabar.cc.columbia.edu id AA18959
  4.   (5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Wed, 4 Jan 1995 09:28:54 -0500
  5. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  6. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  7. Newsgroups: comp.software.testing,comp.protocols.kermit.misc
  8. Subject: Re: testing with kermit
  9. Date: 4 Jan 1995 14:28:49 GMT
  10. Organization: Columbia University
  11. Lines: 129
  12. Message-Id: <3eebb1$igb@apakabar.cc.columbia.edu>
  13. References: <3ec7fo$9ol@mhvnews.kgn.ibm.com>
  14. Nntp-Posting-Host: watsun.cc.columbia.edu
  15. Keywords: kermit testing
  16. Xref: news.columbia.edu comp.software.testing:2980 comp.protocols.kermit.misc:1530
  17. Apparently-To: kermit.misc@watsun.cc.columbia.edu
  18.  
  19. In article <3ec7fo$9ol@mhvnews.kgn.ibm.com>,
  20.  <shapiro@minnie.nic.kingston.ibm.com> wrote:
  21. >To handle repetitive tasks I've resorted to the public domain package
  22. >known as kermit.
  23. >
  24. It's not public domain.  Read the copyright notice.
  25.  
  26. >Even though I'm on a full blown TCPIP network
  27. >with telnet and rsh available everywhere Kermit is convenient
  28. >to "automate" tasks.
  29. >
  30. >Works rather well, 
  31. >Commands that complete quickly work great.
  32. >Commands that take a long time, timeout , prematuring terminating the 
  33. >process.  I've discovered that
  34. >REMOTE SET SERVER TIMEOUT 0
  35. >will make the timeout value infinite, but I still timeout with:
  36. >"Sent too many NAKs"
  37. >
  38. This type of message appears when a file transfer fails.  A NAK (Negative
  39. Acknowledgement) occurs when an expected packet does not arrive within the
  40. specified (or default) timeout interval, or when it arrives in damaged
  41. condition (e.g. back checksum).
  42.  
  43. The only "commands" that time out are file transfers and other protocol-
  44. driven operations (client/server stuff) and script programming commands
  45. that expect certain inputs within a specified or default amount of time.
  46.  
  47. You can control protocol-related timeouts with the SET { SEND, RECEIVE }
  48. TIMEOUT command.  { REMOTE } SET SERVER TIMEOUT controls only one thing:
  49. whether Kermit, when in server mode, sends periodic NAKs while waiting
  50. for commands, i.e. when it is doing nothing.  These NAKs are normally not
  51. needed, but if the Kermit program on the other end is not capable of
  52. timing out (e.g. early versions, circa 1981, of CP/M Kermit), then this
  53. would be the only way to break the deadlock that would occur if a
  54. server command packet sent by a non-timing-out client were to be lost
  55. in transit.
  56.  
  57. >Its especially attrocious when I want to mix a workload of
  58. >quick executing commands and long executing commands.
  59. >All my scripts are short, and are basically single script commands
  60. >with lots of continuation. This is probably why I can't mix.
  61. >
  62. All you have to do is read the manual.
  63.  
  64. >small sample of a test script:
  65. >
  66. >; SET NETWORK TCP/IP
  67. >LOG SESSION output.out
  68. >SET HOST node
  69. >script gin:--gin:--gin: root word: passwd ]> who ]> date ]> \
  70. >who~sam~si~s& ]> \
  71. >jobs~s~-l ]> \
  72. >who~sam~si ]> quit
  73. >
  74. In this example, you are using the old uucp-style SCRIPT command,
  75. which is not the best way to write scripts because it is cryptic,
  76. limited, and inflexible.  There is a much more readable, powerful,
  77. and flexible script programming language that is documented in
  78. chapters 11-13 of the manual (see below).  It lets you (for example)
  79. specify an explicit timeout on each item.  Your example above might
  80. be recoded as something like this:
  81.  
  82.   LOG SESSION output.out
  83.   SET HOST node
  84.   SET INPUT ECHO ON ; (or OFF, as you wish)
  85.   INPUT 20 gin:
  86.   IF FAIL STOP 1 {Failure to get Login prompt}
  87.   OUTPUT root\13
  88.   INPUT 5 word:
  89.   IF FAIL STOP 1 {Failure to get password prompt}
  90.   SET INPUT TIMEOUT QUIT
  91.   INPUT 30 ]>
  92.   OUTPUT who\13
  93.   INPUT 10 ]>
  94.   OUTPUT date\13
  95.   INPUT 10 ]>
  96.   OUTPUT who am i\13
  97.   INPUT 10 ]>
  98.   OUTPUT jobs -l\13
  99.  
  100. >Anybody got any bright ideas?
  101. >
  102. Read the manual?
  103.  
  104.   Frank da Cruz and Christine M. Gianone, "Using C-Kermit", Digital Press /
  105.   Butterworth-Heinemann, Woburn, MA, 1993, 514 pages, ISBN 1-55558-108-0
  106.  
  107.   US single-copy price: $34.95; quantity discounts available.  Available in
  108.   computer bookstores or directly from Columbia University:
  109.  
  110.     Kermit Development and Distribution
  111.     Columbia University Academic Information Systems
  112.     612 West 115th Street
  113.     New York, NY  10025  USA
  114.     Telephone: (USA) 212 854-3703
  115.  
  116.   Domestic and overseas orders accepted.  Price: $34.95 (US, Canada, and
  117.   Mexico), $45 elsewhere.  Orders may be paid by MasterCard or Visa, or
  118.   prepaid by check in US dollars.  Add $35 bank fee for checks not drawn on
  119.   a US bank.  Price includes shipping.  Do not include sales tax.
  120.   Inquire about quantity discounts.
  121.  
  122.   You can also order by phone from the publisher, Digital Press /
  123.   Butterworth-Heinemann, with MasterCard, Visa, or American Express:
  124.  
  125.     +1 800 366-2665 (Woburn, Massachusetts office for USA & Canada)
  126.     +1 800 665-1148 (Logan Bros, Winnepeg, Manitoba office for Canada)
  127.     +44 993 58521   (Rushden, England office for Europe)
  128.     +61 2 372-5511  (Chatswood, NSW office for Australia & New Zealand)
  129.     +65 220-3684    (Singapore office for Asia)
  130.  
  131.   A German-language edition is also available:
  132.  
  133.     Frank da Cruz and Christine M. Gianone, "C-Kermit - Einfuehrung und
  134.     Referenz", Verlag Heinz Heise, Hannover, Germany (1994).
  135.     ISBN 3-88229-023-4.  Deutsch von Gisbert W. Selke.  Price: DM 90,00.  
  136.     Verlag Heinz Heise GmbH & Co. KG, Helstorfer Strasse 7, D-30625 Hannover.
  137.     Tel. +49 (05 11) 53 52-0, Fax. +49 (05 11) 53 53-1 29.
  138.  
  139. - Frank
  140.  
  141. P.S. I sympathize with people who don't like the SCRIPT command.  Once the
  142. INPUT/OUTPUT/IF/GOTO/FOR/WHILE/etc style of script programming was added to
  143. C-Kermit in version 5A, I was tempted to yank it out, but of course I could
  144. not because many people depended on it.  People who want to write new
  145. scripts, however, are encouraged to use the new features rather than the
  146. old SCRIPT command unless they are totally comfortable with the SCRIPT
  147. command and its limitations.